package com.dengke.hellospringmvc.demo;

import java.sql.SQLException;
import java.util.List;

import com.dengke.hellospringmvc.config.ApplicationContextConfig;
import com.dengke.hellospringmvc.dao.QueryForListReturnListDAO;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class QueryForListReturnList_Test {
	public static void main(String[] args) throws SQLException {

		ApplicationContext context = new AnnotationConfigApplicationContext(ApplicationContextConfig.class);

		QueryForListReturnListDAO dao = context.getBean(QueryForListReturnListDAO.class);

		List<String> names = dao.getDeptNames("A");

		for (String name : names) {

			System.out.println("Dept Name: " + name);
		}
	}

}
